package cn.edu.scau.cmi.wangshuhong.singleton;
import java.util.ArrayList;
public class MultiPleton {
	private static final int N=10;
	private static ArrayList<MultiPleton> list =new ArrayList<MultiPleton>(N);
	public static int no;
	private String name;
	private MultiPleton(String name){
		this.name=name;
		//System.out.println("");
	}
	public static void create(String name){
		if(no<N){
			list.add(new MultiPleton(name));
			no++;
		}
	}
	public static MultiPleton getInstance(int i){
		
		return list.get(i);
	}
	public String getName(){
		return name;
	}
}
